package cn.itcast.config;

import cn.itcast.pojo.Country;
import cn.itcast.pojo.Person;
import cn.itcast.pojo.Province;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wuhaohua
 */
@Configuration
public class DemoConfig {
    @Bean
    public Country country() {
        return new Country();
    }

    @Bean
    public Province province() {
        return new Province();
    }

    @Bean
    public Person person() {
        Person person = new Person();
        person.setName("whh");
        person.setAge(18);
        return person;
    }
}
